import request from '@/utils/request'

export function getByParam(params) {
  return request({
    url: '/serviceManagement/serviceInfo/getByParam',
    method: 'get',
    params
  })
}

export function update(data) {
  return request({
    url: '/serviceManagement/serviceInfo/update',
    method: 'post',
    data
  })
}

export function add(data) {
  return request({
    url: '/serviceManagement/serviceInfo/add',
    method: 'post',
    data
  })
}

export function getHouseInfo(params) {
  return request({
    url: '/serviceManagement/serviceInfo/getHouseInfo',
    method: 'get',
    params
  })
}

export function getServiceInfo(params) {
  return request({
    url: '/serviceManagement/serviceInfo/getServiceInfo',
    method: 'get',
    params
  })
}

export function getCategory(params) {
  return request({
    url: '/serviceManagement/serviceInfo/getCategory',
    method: 'get',
    params
  })
}

export function getName(params) {
  return request({
    url: '/serviceManagement/serviceInfo/getName',
    method: 'get',
    params
  })
}

export function deleteById(serviceId) {
  return request({
      url: '/serviceManagement/serviceInfo/deleteById',
      method: 'post',
      headers: {
          'Content-Type': 'application/json'
      },
      data: serviceId
  })
}

export function deleteBatch(data) {
  return request({
      url: '/serviceManagement/serviceInfo/deleteBatch',
      method: 'post',
      data
  })
}
